<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>消息列表</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="//cdn.bootcss.com/weui/0.4.3/style/weui.min.css">
		<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/0.8.3/css/jquery-weui.min.css">
		<link rel="stylesheet" href="../css/index.css" />
	</head>
	<body id="presslistdetails">
		<h1 id="name" style="margin-bottom: 15px;"></h1>
		<b id="updateTime"></b>
		<section>
			<div id="detail">
				
			</div>
		</section>
		<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
		<script src="//cdn.bootcss.com/jquery-weui/0.8.3/js/jquery-weui.min.js"></script>
		<script type="text/javascript" src="../js/basic.js" ></script>
		<script>
			var ip_addr = getUrl();
			$(document).ready(function() {
				messagedetail();
				
			});
			function messagedetail() {
				var id = GetQueryString("id");
				$.ajax({
					type: 'post',
					dataType: "json",
					url: ip_addr + 'message/detail',
					data: {
						id: id,
					},
					success: function(data) {
						var result = data.data;
						var innerHTML = '';
						if(data.code == 0) {
							$("#name").text(result.name);
							$("#updateTime").text(formatDateM(result.updateTime));
							$("#detail").text(result.detail);
						} else {
							alert(data.msg);
						}
					}
				});
			}
			
			
			var referUrl='newsList.html';
			pushHistory(referUrl);//微信苹果返回刷新
			/*点击微信返回时，会刷新*/
			function pushHistory(referUrl){ window.addEventListener("popstate",function(e){
			  location.href=referUrl;
			 }, false);
			 var state = {
			   title:''
			 };
			 var title='';
			 var url='';
			 window.history.pushState(state,title,url);
			}
			
		</script>
	</body>
</html>
